#include<stdio.h>
int main()
{
	double n,sum,h;
	scanf("%lf",&n);
	sum=n;
	h=n;
	do
	{
		n=0.7*n;
		sum+=n*2;
	}while(n>=h/1000);
	printf("%.4lf\n",sum-2*n);
	return 0;
}
